﻿/**
 * 
 * @file FITKAbstractRadiossSurface.h
 * @brief  Radioss表面抽象类
 * @author LiBaojun (libaojunqd@foxmail.com)
 * @date 2025-09-18
 * 
 */
#ifndef _FITK_ABSTRACT_RADIOSS_SURFACE_H__
#define _FITK_ABSTRACT_RADIOSS_SURFACE_H__

#include "FITKAbstractRadiossData.h"
#include "FITK_Interface/FITKInterfaceModel/FITKMeshSurfaceElement.h"

namespace Radioss
{
    class FITKRadiossMeshModel;
    /**
     * @brief  Radioss表面抽象类
     * @author LiBaojun (libaojunqd@foxmail.com)
     * @date 2025-09-18
     */
    class FITKRadiossDataAPI FITKAbstractRadiossSurface : public Interface::FITKMeshSurfaceElement,
                                                public FITKAbstractRadiossData
    {
    public:
        /**
         * @brief Radioss表面类型
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2025-09-18
         */
        enum RadiossSurfaceType
        {
            RST_None = -1,
            RST_Part = 0,   
            RST_PartAll,
            RST_PartExt,
            RST_SEG,
        };
        Q_ENUM(RadiossSurfaceType);

    public:
        /**
         * @brief Construct a new FITKAbstractRadiossSurface object
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2025-09-18
         */
        explicit FITKAbstractRadiossSurface() = default;
        /**
         * @brief Destroy the FITKAbstractRadiossSurface object
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2025-09-18
         */
        virtual ~FITKAbstractRadiossSurface() = 0;
        /**
         * @brief 获取Radioss表面类型
         * @return RadiossSurfaceType
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2025-09-18
         */
        virtual RadiossSurfaceType getRadiossSurfaceType() = 0;
        /**
         * @brief  添加单元表面
         * @param[i]  element       单元ID
         * @param[i]  surfaceIndex  表面索引
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2025-09-18
         */
        void addElementSurface(int element, int surfaceIndex);
        /**
         * @brief 获取表面包含的全部节点ID列表
         * @return int
         * @author LiBaojun 
         * @date 2025-09-26
         */
        QList<int> getSurfaceNodeIDs();

        /**
         * @brief 获取指定单元ID的表面索引
         * @param[i]  elementID     单元ID
         * @return QList<int>  表面索引列表
         * @author LiBaojun
         * @date 2025-10-15
         */
        QList<int> getElementSurfaceIDs(const int &elementID ) const;

    protected:
        /**
         * @brief 获取Radioss网格模型
         * @return FITKRadiossMeshModel*
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2025-09-18
         */
        FITKRadiossMeshModel* getRadiossMeshModel();

    protected:
        QMultiHash<int,int> _elementSurface{};//单元表面，单元ID-表面索引

    };

} // namespace Radioss

#endif // _FITK_ABSTRACT_RADIOSS_SURFACE_H__